package cms.api;

import cms.model.Organization;
import cms.model.OrganizationCredits;
import com.alibaba.fastjson.JSONObject;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.text.ParseException;
import java.util.List;

/**
 * Created by DixonLim on 2016/12/1.
 */
public interface OrganizationCreditsApi {

    public String toString();

    public Page<OrganizationCredits> findOrganizationCreditsByOrganizationAndSendTypeAndSendDatePage(List<Organization> organization, String sendType, String dateStart, String dateEnd, Pageable pageable) throws ParseException;

    public JSONObject findOrganizationCreditsByOrganizationAndSendTypeAndSendDate(List<Organization> organization, String sendType, String dateStart, String dateEnd, Pageable pageable) throws ParseException;

    public List<OrganizationCredits> findByOrganization(Organization organization);

    /**
     * 查询组织机构积分变动记录
     * @param orgId
     * @param pageable
     * @return
     */
    Page<OrganizationCredits> listOrganizationCreditsByOrganizationId(String orgId ,Pageable pageable);

    //保存积分消费记录
    OrganizationCredits saveOrganizationCredits(OrganizationCredits organizationCredits);

}
